package com.bigevent.bigevent.anno;

import com.bigevent.bigevent.anno.impl.StateValidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Constraint(
        validatedBy = {StateValidation.class}
)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface State {
    String message() default "state must be 已发布 or 草稿";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
